package data;

//Singleton class: local DataBase in application
public class DB {
	private static DB this_db=null;
	private final static Integer myMutex = new Integer(1);
	public String instanceDNS="ec2-23-21-21-171.compute-1.amazonaws.com";
	
	
	public double userID;
	public String userName;
	public String userPhone;
	public String UserCarNo;
	public int userGrade;
	public int userCredit;
	public double curLocLat;
	public double curLocLong;
	public ParkingSpotList dbList;
	public String registration_id;
	public int notification_type;
	public boolean dealClosed=false; 

	/* 0-request arrived (to owner)
	 * 1-request was confirmed(to buyer)
	 * 2-deal accepted by buyer too (msg to buyer and to owner)
	*/
	public String userDealPhone;
	public double userDealId;
	public int spotRentId;
	public boolean buyer=false;
	
	private DB(){
		
	}
	public static DB getInstance() {
		if (this_db == null) {
			synchronized(myMutex){
				if (this_db == null){
					this_db = new DB();
				}
			}
		}
		return this_db;
	}

}
